package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.GoodsLimitBean;
import cn.xfdzx.android.apps.shop.bean.GoodsMiaoSBean;
import io.reactivex.Flowable;


/**
 * @author zf
 * @date 2020/8/17.
 * Description：限量活动
 */

public interface GoodsLimitContract {
    interface Model {
        Flowable<GoodsLimitBean> getGoodsLimitList(String limit, int page);

        Flowable<GoodsLimitBean> getGoodsLimitListHighSales();

        Flowable<GoodsMiaoSBean> getGoodsMiaoShaList(String limit, int page);

        Flowable<GoodsMiaoSBean> getGoodsStock(String good_id);

        Flowable<GoodsMiaoSBean> getLimitGoodsStock(String good_id);
    }

    interface View extends BaseView {
        /**
         * 刷新完成
         */
        void finishRefresh();

        /**
         * 加载完成
         */
        void finishLoadMore();

        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void getGoodsLimitListSuccess(GoodsLimitBean bean);

        void getGoodsLimitListHighSalesSuccess(GoodsLimitBean bean);

        void getGoodsMiaoShaListSuccess(GoodsMiaoSBean bean);

        void getGoodsStockSuccess(GoodsMiaoSBean bean);

        void getLimitGoodsStockSuccess(GoodsMiaoSBean bean);
    }

    interface Presenter {

        /**
         *列表
         */
        void getGoodsLimitList(boolean isRefresh, boolean isLoading, String limit, int page);

        void getGoodsLimitListHighSales();

        void getGoodsMiaoShaList(boolean isRefresh, boolean isLoading, String limit, int page);

        void getGoodsStock(String good_id);

        void getLimitGoodsStock(String good_id);
    }
}
